package io.potato.ts.domain;

import java.io.Serializable;
import java.time.LocalDateTime;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import io.potato.core.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 部门表
 * NOTICE： this file is generated by code, DO NOT modify it!
 * @author timl
 *
 * <p>2019-03-11 18:22:11</p>
 */
 
@Entity
@Table(name="t_dept")
@Data
@EqualsAndHashCode(callSuper=false)
public class Dept extends BaseEntity implements Serializable{

	private static final long serialVersionUID = 1552299731525L;

	/**
	 * 主键
	 */
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	
	/**
	 * 部门名称
	 */
	@Column(name="dept_name")
	@NotBlank(message = "部门名称不能为空")
	private String deptName;
	
	/**
	 * 显示顺序
	 */
	@Column(name="show_order")
	@NotNull(message = "显示顺序不能为空")
	private Integer showOrder;
	
	/**
	 * 所属单位ID
	 */
	@Column(name="organ_id")
	private Integer organId;

	/**
	 * 创建时间
	 */
	@Column(name="created_at", insertable=false, updatable=false)
	private LocalDateTime createdAt;
	
	/**
	 * 更新时间
	 */
	@Column(name="updated_at", insertable=false, updatable=false)
	private LocalDateTime updatedAt;
	
}